Skip to content

fix: deserialize Id-suffixed tracking option keys - #813

Open
miachillgood wants to merge 1 commit into
XeroAPI:masterfrom
miachillgood:fix/deserialize-id-suffix-variants
Open

fix: deserialize Id-suffixed tracking option keys#813
miachillgood wants to merge 1 commit into
XeroAPI:masterfrom
miachillgood:fix/deserialize-id-suffix-variants

Conversation

@miachillgood

Copy link
Copy Markdown
Contributor

Summary

  • allow accounting model deserialization to fall back from ...ID to ...Id keys
  • add a regression test covering TrackingOptionId inside invoice line-item tracking data

Why

#777 reports that trackingOptionID is defined in the SDK types but stays undefined when getInvoices() returns tracking data.

The generated accounting deserializer currently only reads exact ...ID keys. When the API response uses an ...Id variant, the value is dropped during deserialization.

Testing

  • npm test -- --runInBand src/test/objectSerializer.spec.ts
  • npm run build

Closes #777

@miachillgood
miachillgood force-pushed the fix/deserialize-id-suffix-variants branch from 93bd8b3 to 4105b25 Compare August 8, 2026 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TrackingOptionId value missing from accountingApi.getInvoices()

1 participant